Hi @meaton, I have indeed taken a look at the Allocations and Time Profiler instruments. Neither of them yield anything out of the ordinary. CPU usage and allocations look fine — pretty much completely idle when the app isn't being interacted with in fact. Despite that, the energy impact and network/overheads in Xcode are still showing very high, but only when the packet tunnel is running.
I commented out all of the code for the inter-process requests so there are no timers running or sendProviderMessage calls being made, the container app makes no network requests whatsoever and yet the problem still occurs.
If the problem is in my own code, I can't see where it is. I am wondering whether iOS is continuously sending counters/statistics/events or something from the packet tunnel back to the container app or something similar? You can probably guess from the graph for the container app when I started the VPN:
Meanwhile, the Energy Impact of the actual VPN extension process itself:
Squarely out of ideas so any thoughts appreciated!
Post
Replies
Boosts
Views
Activity
There could be NEVPNStatus events being sent to the container app, but I am doubting it would could cause network overhead in your app. Are you observing events for NEVPNStatusDidChangeNotification?
Thanks for the tip. I do indeed subscribe to NEVPNStatusDidChange, although that only fires a couple of times (when the VPN changes state, as expected). I commented that out too so that we're no longer observing that, for good measure, but the problem still persists.